<template>
  <!-- <el-collapse accordion class="margin-bottom">
    <el-collapse-item>
      <template slot="title">
        <el-row style="width:100%" class="padding-lr">
          <i class="el-icon-copy-document text-lg"></i>
          <span class="text-df text-bold margin-left-sm">发票</span>
        </el-row>
      </template> -->
  <div class="padding" style="margin-left:-16px;">
    <el-card>
      <div slot="header" class="clearfix relative">
        <span class="title-icon">发票</span>
        <!-- <el-button
          type="success"
          size="mini"
          class="header-save-btn"
          @click="editInvoice"
        >
          编辑
        </el-button> -->
      </div>

      <!-- <el-row class="margin-bottom-sm">
        <el-col :span="6">
          <span>ShipMentID:</span>
          <span>FBA0099AFFFF</span>
        </el-col>
        <el-col :span="6">
          <span>ReferenceID:</span>
          <span>FBA0099AFFFF</span>
        </el-col>
      </el-row> -->
      <el-table size="mini" :data="invoiceData" border>
        <el-table-column prop="sku" label="SKU"> </el-table-column>
        <el-table-column prop="declareNameCn" label="中文品名">
        </el-table-column>
        <el-table-column prop="declareNameEn" label="英文品名">
        </el-table-column>
        <el-table-column prop="brand" label="品牌"> </el-table-column>
        <el-table-column prop="material" label="材质"> </el-table-column>
        <el-table-column prop="purpose" label="用途"> </el-table-column>
        <el-table-column prop="customsCode" label="海关编码"> </el-table-column>
        <el-table-column prop="asin" label="ASIN"> </el-table-column>
        <el-table-column prop="isCharged" label="是否带电"> </el-table-column>
        <el-table-column prop="model" label="型号"> </el-table-column>
        <el-table-column prop="num" label="个数"> </el-table-column>
        <el-table-column prop="measurementUnit" label="单位"> </el-table-column>
        <el-table-column prop="perSuitNum" label="每套个数"> </el-table-column>
        <el-table-column prop="purchasingPrice" label="采购单价RMB">
        </el-table-column>
        <el-table-column prop="declareValue" label="申报单价">
        </el-table-column>
        <el-table-column prop="imgUrl" label="图片"> </el-table-column>
      </el-table>
    </el-card>
  </div>
  <!-- </el-collapse-item>
  </el-collapse> -->
</template>

<script>
import { ajax } from "@/store/yg/common/utils";
import axios from "axios";
import * as constant from "@/store/yg/common/constant";

export default {
  props: {
    pageType: {
      type: String,
      required: true
    },
    waybillData: {}
  },
  data() {
    return {
      waybillId: 0,
      shippingway: 0,
      invoiceData: [
        {
          sku: "LM223232",
          declareNameCn: "电脑",
          declareNameEn: "computer",
          brand: "苹果mac",
          material: "玻璃",
          purpose: "办公用品",
          customsCode: "HSA212345",
          asin: "FDJFLDJFDL",
          isCharged: "是",
          model: "M2",
          num: 0,
          measurementUnit: "台",
          perSuitNum: 0,
          purchasingPrice: 0,
          declareValue: 0,
          imgUrl: ""
        },
        {
          sku: "LM223232",
          declareNameCn: "电脑",
          declareNameEn: "computer",
          brand: "苹果mac",
          material: "玻璃",
          purpose: "办公用品",
          customsCode: "HSA212345",
          asin: "FDJFLDJFDL",
          isCharged: "是",
          model: "M2",
          num: 0,
          measurementUnit: "台",
          perSuitNum: 0,
          purchasingPrice: 0,
          declareValue: 0,
          imgUrl: ""
        }
      ]
    };
  },

  methods: {
    editInvoice() {},
    initData() {
      var param = {};
      param["id"] = this.$route.query.waybillId;
      param["shippingWayType"] = this.$route.query.shippingway;
      ajax("initLiquidationInvoices", param).then(
        res => {
          if (res.code != 200) {
            this.$message.error(res.message);
          } else {
            this.invoiceData = res.data;
          }
          this.showdata = true;
        },
        error => {
          console.log(error);
        }
      );
    }
  },
  mounted() {
    this.waybillId = this.$route.query.waybillId;
    this.shippingway = this.$route.query.shippingway;
    this.initData();
  }
};
</script>

<style></style>
